import request from '@/utils/request'

// 查询模型授权申请列表
export function listApply(query) {
  return request({
    url: '/model/apply/list',
    method: 'get',
    params: query
  })
}

// 查询模型授权申请详细
export function getApply(id) {
  return request({
    url: '/model/apply/' + id,
    method: 'get'
  })
}

// 新增模型授权申请
export function addApply(data) {
  return request({
    url: '/model/apply',
    method: 'post',
    data: data
  })
}

// 修改模型授权申请
export function updateApply(data) {
  return request({
    url: '/model/apply',
    method: 'put',
    data: data
  })
}

// 删除模型授权申请
export function delApply(id) {
  return request({
    url: '/model/apply/' + id,
    method: 'delete'
  })
}

//授权通过
export function passedApply(data){
  return request({
    url:'/model/apply/passed',
    method: 'post',
    data
  })
}

//授权不通过
export function failApply(data){
  return request({
    url:'/model/apply/fail',
    method: 'post',
    data
  })
}

// 是否已申请
export function isApply(id){
  return request({
    url: '/model/apply/isApply/' + id,
    method: 'get'
  })
}
